﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace Three_Red_Dragon_Mvc.Controllers
{
    /// <summary>
    /// 仓库控制器
    /// </summary>
    public class WarehouseController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        public WarehouseController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        public IActionResult Index()
        {
            return View();
        }
        /// <summary>
        /// 仓库列表
        /// </summary>
        /// <returns></returns>
        public IActionResult Warehouse()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        /// <summary>
        /// 仓库新增
        /// </summary>
        /// <returns></returns>
        public IActionResult WarehouseAdd()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
        
    }
}
